﻿<!--
  ~ Copyright Thoughtworks, Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
  <title>Maintenance Mode</title>
  <style type="text/css">
    #header {
      color:         #fff;
      font-size:     11px;
      border-bottom: 1px solid #333;
      left:          0;
      position:      fixed;
      z-index:       1001;
      right:         0;
      top:           0;
    }

    #header {
      clear: both;
    }

    #header .header {
      background: linear-gradient(to bottom, #333 0%, #0f0f0f 100%);
      padding:    5px 15px;
    }

    .header #application_logo {
      background-position: 0 4px;
      background-repeat:   no-repeat;
      float:               left;
      height:              35px;
      width:               114px;
    }

    .message {
      margin:      10px;
      float:       left;
      font-size:   11px;
      font-weight: 200;
      color:       #999;
      font-family: Arial, Helvetica, sans-serif;
    }

    .clear_float::after {
      clear:      both;
      content:    ".";
      display:    block;
      height:     0;
      visibility: hidden;
    }

  </style>
</head>
<body>
<div id="body_bg">
  <div id="header">
    <div class="header clear_float">
      <a href="#" id="application_logo">&nbsp;</a>
      <div class="message">
        <span id="message_text"/>
        &nbsp;
        <a target="_blank" href="%docsBaseUrl%/advanced_usage/maintenance_mode.html">Learn More</a>
      </div>
    </div>
  </div>
</div>
</div>
<script type="application/javascript">
  (function () {
    var message = "%updatedBy% turned on maintenance mode at " + new Date("%updatedOn%").toString();
    if("%updatedBy%" === 'GoCD') {
      message = "GoCD Server is started in maintenance mode at " + new Date("%updatedOn%").toString();
    }
    document.getElementById("message_text").innerText = message;
  })();
</script>
</body>
</html>
